You are here: Commerce Manager > System Administration > System Settings > Adding a Many to Many Relation

Adding a Many to Many Relation

You can also create Many to Many Relationships with business objects. For example, many to many relationships help to track different SKUs and their inventory levels with different warehouse locations. Another example is multiple contacts a part of multiple organizations. A Many to Many relationship between two objects is also referred to as a Bridge.

In the example both Organization and Organization_Contact = N.

To create a Many to Many relationship, click on a business object and then click on the N:N Relations tab.

Click on New Relation "many to many" to create a new N:N relationship.

The Relation N:N is much different compared to the Relation 1:N/N:1 forms.

  1. The Current Object defaults to the name of the Business Object you are editing
  2. Select a Related Object from the dropdown menu
  3. The Relation Name is autopopulated by (Current Object Name_Related Object Name). Change this name if you wish, but you cannot have spaces or special characters, only letters, numbers, and underscores.
  4. Enter in a Friendly Name, which can have special characters and spaces. Make sure both Relation and Friendly Names are unique do not already exist.
  5. Under Current Object, select a Display Region where the field will appear.
  6. Under Related Object, select a Display Region where the field will appear.

Once all the relevant information is entered, click on Save.

A many to many relationship is automatically generated for the related object when you click on its N:N tab under its configuration form.

 


Version: EPiServer Commerce 1 R2 SP2| Last updated: 2012-09-20 | Copyright © EPiServer AB | Send feedback to us